<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
$sql="SELECT a.id,b.BuMenName,c.XingMing,a.BeginTime,a.EndTime,a.Minutes,a.NeiRong,if(a.Status=0,'待审核',if(a.Status=1,'已通过','被驳回')) Status,a.Status StatusCode,a.ReferTime,a.ShenHeTime from GongZuoRecord a,BuMenTree b,user c where a.BuMenId = b.id and a.person_id = c.id and a.IsDelete = 0 and a.ShenHeRen = {$_GET['person_id']} order by a.ReferTime desc";
$query = $mysqli->query($sql);
while ($a = $query->fetch_assoc()) {
  $array[] = $a;
}
echo json_encode($array);
exit;
?>
